d = {'hello': 10, 'world': 20 }
print(d.get('hello'))
print(d['hello'])

print(d.get('java'))
print(d.get('java', '不存在的'))
# print(d['java'])

for item in d.items():
    print(item) #元组

for index, item in d.items():
    print(index, item)